package com.zbest.zpay.integration.redis;

/**
 * Created by luqingfeng on 2015/3/18.
 */
public interface RedisClient {

    /**
     * put data into redis
     * @param key
     * @param value
     * @return
     */
    void putData(String key, Object value);

    /**
     * put data into redis
     * @param key
     * @param value
     * @return
     */
    void putData(String key, Object value, long timeout);

    /**
     * get data from redis
     * @param key
     * @return
     */
    Object getData(String key);

    /**
     * 删除一个key
     * 
     * @param key
     */
    void remove(String key);

    /**
     *
     * 幂等控制,不建议使用，实现中没有做降级策略
     * 
     * @param key
     * @param seconds
     * @return true:
     */
    @Deprecated
    boolean uniqueCheck(String key, int seconds);

}
